/**
 * @(#) Employee.java
 */

package TheRestaurantOwner;

public abstract class Employee
{
	// Each waiter, the chef and the barman have a name and a surname.
	private String name;
	private String surname;
	
	// Each waiter, the chef and the barman have a salary and a level of experience.
	// At the beginning, every member of the staff has a low level of experience.
	private Experience levelOfExperience = Experience.low;
	
	protected int trainingCost;
	
	public abstract int getSalary( );
	
	// At any point in time during the game, the owner can increase the level of experience of a waiter with
	// a training course that costs in total 800 euros (if the budget is sufficient for this). It is also possible to
	// increase the level of experience of the chef and the barman with a training course that costs in total
	// 1200 euros (if the budget is sufficient for this).
	public int sendToTraining( ) {
		switch (levelOfExperience){
		case low:
			levelOfExperience = Experience.medium;
			return trainingCost;
		case medium:
			levelOfExperience = Experience.high;
			return trainingCost;
		case high:
			System.out.println("Level of experience is already highest!");
			return 0;
		}
		return 0;
	}
	
	public void setName( String name, String surname )
	{
		this.name = name;
		this.surname = surname;
	}

	public Experience getExperience( ) {
		return levelOfExperience;
	}

	public void setExperience( Experience experience ) {
		this.levelOfExperience = experience;
	}

	public String getName( ) {
		return name;
	}

	public String getSurname( ) {
		return surname;
	}

	public int getTrainingCost( ) {
		if (levelOfExperience == Experience.high){
			return 0;
		}
		return trainingCost;
	}
}
